<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/8/15
 * Time: 9:21
 */

namespace App\Console\Service\IPProxyPool\Inc;


class config
{
    private static $_instance;

    private final function __construct()
    {
        //echo 'test __construct';
    }

    private function __clone()
    {
    }

    public static function getInstance()
    {
        if (!(self::$_instance instanceof self)) {
            self::$_instance = new test();
        }
        return self::$_instance;
    }

    /**
     * 配置
     */
    public static $update_time = 30 * 60; # 每半个小时检测一次是否有代理ip失效
    public static $minnum = 50; # 当有效的ip值小于一个时 需要启动爬虫进行爬取
    public static $timeout = 5;
    public static $retry_time = 3;  # 重试次数

    /**
     * 测试地址
     */
    public static $test_url = 'http://ip.chinaz.com/getip.aspx';
    public static $test_ip = 'http://httpbin.org/ip';
    public static $test_http_header = 'http://httpbin.org/get';
    public static $test_https_header = 'https://httpbin.org/get';

}